package com.xhtt.modules.cfg.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xhtt.common.utils.PageUtils;
import com.xhtt.common.utils.Query;
import com.xhtt.modules.cfg.dao.CfgWarnInsMapper;
import com.xhtt.modules.cfg.entity.CfgWarnIns;
import com.xhtt.modules.cfg.entity.CfgWarnSj;
import com.xhtt.modules.cfg.service.CfgWarnInsService;
import com.xhtt.modules.inspection.schedule.InsMsgEntity;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 巡检报警设置 服务实现类
 * </p>
 *
 * @author feipc
 * @since 2019-04-10
 */
@Service
public class CfgWarnInsServiceImpl extends ServiceImpl<CfgWarnInsMapper, CfgWarnIns> implements CfgWarnInsService {

    @Override
    public PageUtils insList(Map<String, Object> params) {
        Page<CfgWarnIns> page = new Query<CfgWarnIns>(params).getPage();
        List<CfgWarnIns> list = baseMapper.insList(page, params);
        page.setRecords(list);
        return new PageUtils(page);
    }

    @Override
    public List<InsMsgEntity> pushList() {
        return baseMapper.pushList();
    }
}
